package dshop.model.news;

import java.util.Date;

import appbase.jfinal.ext.BaseModel;
import dshop.AppConst;

public class News extends BaseModel<News>{
	
	private static final long serialVersionUID = -7251186805383459897L;

	public static final News dao = new News();

	
	
	public static final String STRUTS_END = "0";
	public static final String STRUTS_FAIL = "1";
	public static final String STRUTS_DELETE = "2";
	public static final String STRUTS_NORMAL = "3";
	
	public static void delete(int newsId) 
	{
		new News().set("status", STRUTS_DELETE)
						 .set("delete_date_time", new Date())
						 .set("id", newsId)
						 .update();
	}


	public static void setCheckStatus(int newsId,String checkStatusExplain, String checkStatus) 
	{
		new News().set("status", checkStatus)
							
		 				 .set("check_date_time", new Date())
		 				 .set("id", newsId)
		 				.set("check_status_explain", checkStatusExplain)
		 				 .update();
	}
	
}
